package com.iplant.wms.service.po.pkg;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

/**
 * 容器与库位关系
 * 容器可存放库位
 * @author ShrisJava
 *
 */
@DBBasePO(TableName = "mss_container_station", CheckName = {"TypeID,StoreStationID"},
        Name = false,  Code = false,Active = false ,
        Schemas = DBSchemas.WMS)
public class MSSContainerStation extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField(CheckValue = true)
    public int TypeID = 0;

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code",tableName ="mss_containertype",tableAsName = "t2",
            Schemas = DBSchemas.WMS,MainTableField ="TypeID" )
    public String TypeCode = "";
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name",tableName ="mss_containertype",tableAsName = "t2",
            Schemas = DBSchemas.WMS,MainTableField ="TypeID" )
    public String TypeName = "";


    @DBCondition
    @DBField(CheckValue = true)
    public int StoreStationID = 0;
    @DBJoin(name = "Name", tableName = "wms_store_station", tableAsName = "s1",
            Schemas = DBSchemas.WMS, MainTableField = "StoreStationID")
    public String StoreStationName = "";

    @DBCondition(CompareType = DBCondition.DBCompareType.like, ParamName2 = "StoreStationCodeEQ")
    @DBJoin(name = "Code", tableName = "wms_store_station", tableAsName = "s1",
            Schemas = DBSchemas.WMS, MainTableField = "StoreStationID")
    public String StoreStationCode = "";



    @JsonProperty("TypeID")
    public int getTypeID() {
        return TypeID;
    }

    public void setTypeID(int typeID) {
        TypeID = typeID;
    }

    @JsonProperty("TypeCode")
    public String getTypeCode() {
        return TypeCode;
    }

    public void setTypeCode(String typeCode) {
        TypeCode = typeCode;
    }

    @JsonProperty("TypeName")
    public String getTypeName() {
        return TypeName;
    }

    public void setTypeName(String typeName) {
        TypeName = typeName;
    }
    @JsonProperty("StoreStationID")
    public int getStoreStationID() {
        return StoreStationID;
    }

    public void setStoreStationID(int storeStationID) {
        StoreStationID = storeStationID;
    }
    @JsonProperty("StoreStationName")
    public String getStoreStationName() {
        return StoreStationName;
    }

    public void setStoreStationName(String storeStationName) {
        StoreStationName = storeStationName;
    }
    @JsonProperty("StoreStationCode")
    public String getStoreStationCode() {
        return StoreStationCode;
    }

    public void setStoreStationCode(String storeStationCode) {
        StoreStationCode = storeStationCode;
    }
}
